package com.bestcem.xm.om.service;

import com.bestcem.xm.common.core.domain.web.ServiceResult;
import com.bestcem.xm.om.controller.param.CreateOmRoleParam;
import com.bestcem.xm.om.controller.param.UpdateOmRoleParam;
import com.bestcem.xm.om.controller.vo.OmRoleVO;
import com.bestcem.xm.om.controller.vo.SimpleIdVO;
import com.bestcem.xm.om.entity.OmRole;
import com.bestcem.xm.om.service.dto.common.UserPageDTO;

import java.util.HashMap;
import java.util.List;

/**
 * @author zq.ding <zq.ding@idiaoyan.com>
 * @version v1.0
 * @date 2021/12/24 17:03
 */
public interface OmRoleService {
    /**
     * omRole分页接口
     *
     * @param page 页数
     * @param size 页面大小
     * @return omRoleVO列表
     * @author zq.ding <zq.ding@idiaoyan.com>
     * @date 2021/12/24 17:03
     */
    ServiceResult<UserPageDTO<OmRoleVO>> pageRole(Integer page, Integer size);

    /**
     * 更新omRole
     *
     * @param param 更新参数
     * @return id
     * @author zq.ding <zq.ding@idiaoyan.com>
     * @date 2021/12/24 17:03
     */
    ServiceResult<SimpleIdVO> updateRole(UpdateOmRoleParam param);

    /**
     * 根据id查询对应的omrole
     *
     * @param id
     * @return omRoleVO
     * @author zq.ding <zq.ding@idiaoyan.com>
     * @date 2021/12/24 17:03
     */
    ServiceResult<OmRoleVO> findById(String id);

    /**
     * 根据id删除对应的omrole
     *
     * @param id
     * @return
     * @author zq.ding <zq.ding@idiaoyan.com>
     * @date 2021/12/24 17:03
     */
    ServiceResult<HashMap<String, Integer>> deleteById(String id);

    /**
     * 新增一个omRole
     *
     * @param createOmRoleParam 创建参数
     * @return
     * @author zq.ding <zq.ding@idiaoyan.com>
     * @date 2021/12/24 17:03
     */
    ServiceResult<SimpleIdVO> create(CreateOmRoleParam createOmRoleParam);

    /**
     * 根据omrole的条件查询列表
     *
     * @param omRole
     * @return
     * @auther xuan.yang@idiaoyan.com
     * @date 2021/12/30 19:42
     */
    ServiceResult<List<com.bestcem.xm.om.grpc.v1.services.OmRole>> listRole(OmRole omRole);


}
